/**
 * @author phoenics@126com
 * @date 2017年11月8日 下午3:02:14
 * @version V1.0
 */

package com.jx.gocom.nlp;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 *
 */
@Configuration
public class MvcConf extends WebMvcConfigurerAdapter {
	public static final String JSON_UTF_8 = "application/json; charset=UTF-8";
	private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MvcConf.class);
	@Override
	public void addCorsMappings(CorsRegistry  registry){
		registry.addMapping("/**")
		.allowedOrigins("*")
		.allowedMethods("*")
		.maxAge(3600);
	}
}
